<template>
	<view class="radioBox flex">
		<view class="radio" :class="curTab==item.val?'active':''" v-for="(item,i) in radioList" @click="tabClick(item)">{{item.title}}</view>
	</view>
</template>

<script>
	export default {
		props:{
			radioList:{
				type: Array,
				default: []
			},
			curTab:{
				type: Number,
				default: 0
			}
		},
		data() {
			return {
				
			}
		},
		methods: {
			tabClick(item){
				this.$emit('updateCurTab', item.val)
			}
		}
	}
</script>

<style lang="scss" scoped>
.radioBox{
	padding: 16rpx 0 24rpx;
	.radio{
		color: #969696;
		height: 68rpx;
		line-height: 68rpx;
		border-radius: 8rpx;
		border: 2rpx solid #969696;
		margin-right: 48rpx;
		padding: 0 32rpx;
		&.active{
			color: $uni-color-primary;
			border-color: $uni-color-primary;
		}
	}
}
</style>